import request from '@/utils/request'


export function getPracticePaperList(params) {
    return request({
        url: '/server/online/paperList',
        method: 'GET',
        params
    })
}

/**
 * 获取试卷列表
 * @param {Object} params - 请求参数
 * @param {number} params.type - 根据type获取不同的试卷列表
 * @returns {Promise} - 返回一个Promise对象，包含请求结果
 */
export function getPaperList(params) {
    return request({
        url: '/server/practice/paperList',
        method: 'GET',
        params
    })
}

/* 生成模拟练习试卷 */
export function createExamRecord(paperId, data) {
    return request({
        url: `/server/practiceTestInfo/createExamRecord?paperId=${paperId}`,
        method: 'POST',
        data
    })
}

/* 获取模拟练习试卷 */
export function getMockExamList(params) {
    return request({
        url: `/server/practice/batchList`,
        method: 'GET',
        params
    })
}

export function createMockExam(data) {
    return request({
        url: `/manager/examinationApprove/mockExamAdd`,
        method: 'POST',
        data
    })
}
